package cn.jdy.plugins.entity;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Transient;

import cn.jdy.common.bo.BaseEntry;
import cn.jdy.platform.entity.ConfValue;

/**
 * 帮助信息实体类
 *
 * @author wuzhiliang
 */
@Entity
public class HelpInfo extends BaseEntry implements Serializable {

	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)//根据数据库自动适配 mysql默认自增
	private Integer id;        //主键
	@Column(nullable = false)
	private String columnid;    //栏目ID
	private String title;      //标题
	@Column(columnDefinition = "longtext")
	private String context;      //内容
	private String keyword;      //关键词
	@Column(updatable=false)
	private String userid;      //发布人
	private String imgUrl;      //封面图片地址
	private String status;      //状态

	@Transient
	private String columnname;    //栏目名
	@Transient
	private String username;    //发布人

	@ManyToOne
	@JoinColumn(name = "columnId", insertable = false, updatable = false)
	private ConfValue cv;
	
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getColumnid() {
		return columnid;
	}

	public void setColumnid(String columnid) {
		this.columnid = columnid;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getColumnname() {
		return columnname;
	}

	public void setColumnname(String columnname) {
		this.columnname = columnname;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public ConfValue getCv() {
		return cv;
	}

	public void setCv(ConfValue cv) {
		this.cv = cv;
	}

}
